<template>
  <view>
    <view class="section-title">企业列表</view>
    <view class="company-list">
      <view class="company-card" v-for="(company, idx) in companyList" :key="idx" @click="toDetail(company)">
        <image :src="company.logo" class="company-logo" />
        <view class="company-name">{{company.name}}</view>
        <view class="company-desc">{{company.desc}}</view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {
      companyList: [
        { name: '文化传媒', logo: '/static/company1.png', desc: '广告/传媒/设计' },
        { name: '天赐供合', logo: '/static/company2.png', desc: '供应链/贸易' },
        { name: '中弘设计', logo: '/static/company3.png', desc: '广告/设计' },
      ]
    }
  },
  methods: {
    toDetail(company) {
      uni.navigateTo({ url: `/pages/company/company-detail?name=${company.name}` })
    }
  }
}
</script>
<style>
.section-title {
  margin: 32rpx 20rpx 12rpx 20rpx;
  font-size: 30rpx;
  font-weight: bold;
  color: #333;
}
.company-list {
  display: flex;
  flex-wrap: wrap;
  padding: 0 20rpx;
}
.company-card {
  width: 45%;
  background: #fff;
  border-radius: 16rpx;
  box-shadow: 0 2rpx 8rpx #f0f1f2;
  margin: 10rpx 2.5%;
  padding: 20rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.company-logo {
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  margin-bottom: 10rpx;
}
.company-name {
  font-size: 28rpx;
  font-weight: bold;
  margin-bottom: 4rpx;
}
.company-desc {
  font-size: 22rpx;
  color: #888;
}
</style> 